<script setup lang="ts">
import { defineProps } from 'vue'
import {useRouter} from 'vue-router'
import type {propsType} from './index'
const router = useRouter()
const props = defineProps<{
  linkList: propsType
}>()

const goLinkUrl = (url: string) => {
  router.push(url)
}

</script>
<template>
  <div class="greetings">
    <el-button
      v-for="button in props.linkList"
      :key="button.text"
      :type="button.type"
      @click="goLinkUrl(button.url)"
      link
      >{{ button.text }}</el-button
    >
  </div>
</template>

<style scoped>

</style>
